﻿//JumbotCms_4.1 Final
using System;
using System.Data;
using System.Web;
using System.Web.UI.WebControls;
using Jumbot.Common;
using JumbotCms.Common;
using JumbotCms.API;
namespace JumbotCms.WebFile.Admin
{
    public partial class _createhtml : JumbotCms.API.AdminCenter
    {
        public string _Go2Create = "false";
        protected void Page_Load(object sender, EventArgs e)
        {
            ChannelId = Str2Str(q("ccid"));
            id = Str2Str(q("id"));
            Admin_Load(ChannelId + "-08", "html", true);
            if (!Page.IsPostBack)
            {
                doh.Reset();
                doh.SqlCmd = "SELECT [ID],[Title],[Code] FROM [jcms_normal_class] WHERE [IsOut]=0 AND [ChannelId]=" + ChannelId + " ORDER BY code";
                DataTable dtClass = doh.GetDataTable();
                ListItem li;
                li = new ListItem("全部", "0");
                this.ddlClass.Items.Add(li);
                for (int i = 0; i < dtClass.Rows.Count; i++)
                {
                    li = new ListItem();
                    li.Value = dtClass.Rows[i]["Code"].ToString();
                    li.Text = getListName(dtClass.Rows[i]["Title"].ToString(), dtClass.Rows[i]["Code"].ToString());
                    this.ddlClass.Items.Add(li);
                }
                dtClass.Clear();
                dtClass.Dispose();
                if (ChannelIsHtml) _Go2Create = "true";
            }
        }

    }
}
